#ifndef CSE168_AASQUARE_H_INCLUDED
#define CSE168_AASQUARE_H_INCLUDED

#include "Vector3.h"
#include "Ray.h"
#include <stdlib.h>

class AARect
{
public:
	AARect(Vector3 c1, Vector3 c2, int axis, Vector3 N);
	virtual ~AARect();

	void setC1(const Vector3& v)    {m_c1 = v;}
	void setC2(const Vector3& v)    {m_c2 = v;}
	void setN(const Vector3& v)     {m_norm = v;}

	virtual bool intersect(HitInfo& result, const Ray& ray);

protected:
	Vector3 m_c1;
	Vector3 m_c2;
	Vector3 m_min;
	Vector3 m_max;
	Vector3 m_norm;
	int m_axis;
};

#endif // CSE168_AASQUARE_H_INCLUDED
